package com.example.ffepeg.ffeImg;

import java.util.ArrayList;
import java.util.List;

public class TestList {
    public static void main(String[] args) {
        List<List<String>> strList = new ArrayList<>();
        List<String> list = new ArrayList<>();
        list.add("路口科技地方就看见");
        strList.add(list);

        List<String> list1 = strList.get(0);
        System.out.println(list1);
        System.out.println("----------------------分割线----------------1------------");
        List<String> list2 = strList.get(strList.size() - 1);
        if (0 == strList.size()-1){
            System.out.println(list2);
            System.out.println("----------------------分割线-------------2---------------");
        }else {
            List<String> mergedList = new ArrayList<>(list1); // 将第一个列表的所有元素添加进去
            mergedList.addAll(list2); // 将第二个列表
            System.out.println(mergedList);
            System.out.println("----------------------分割线-------------3---------------");
        }
    }
}
